import hashlib
import time
# 获取当前时间
# nowTime = time.time()
nowTime = '1651139428'

token = '76012d7bd1c81326d2e3c96182703f93d5f4be4b276ef429e4e6f429a17cfc4c'
key = 'f8b6dbe69a62915c594b4c3d42471e661dc8fa6fadeb862529cc5c0ebb7d69cf'
# 秒级时间戳
timestamp = str(int(nowTime))
# 带拼接字符串
tempStr = timestamp+token+timestamp+key
# 进行hash256加密
result = hashlib.sha256(tempStr.encode("unicode_escape").decode('utf-8').encode('utf-8')).hexdigest()
# 输出结果
print(timestamp)
print("Token="+token+",Signature="+result)
